package com.tac.controller.wms;

import com.tac.common.result.Result;
import com.tac.pojo.wms.VehicleDispatchDetails;
import com.tac.service.wms.VehicleDispatchDetailsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@RestController
@RequestMapping("/vehicleDispatchDetails")
@Api(tags = "智能仓储WMS--运输管理--车辆调度明细相关接口")
@CrossOrigin
public class VehicleDispatchDetailsController {

    @Autowired
    private VehicleDispatchDetailsService vehicleDispatchDetailsService;


    @ApiOperation("车辆调度明细添加")
    @PostMapping("/save")
    public Result save(@RequestBody VehicleDispatchDetails vehicleDispatchDetails) {
        return vehicleDispatchDetailsService.save(vehicleDispatchDetails);
    }

    @ApiOperation("车辆调度明细删除")
    @DeleteMapping("/remove")
    public Result remove(@RequestBody List<Integer> ids) {
        return vehicleDispatchDetailsService.remove(ids);
    }

    @ApiOperation("车辆调度明细修改")
    @PutMapping("/update")
    public Result update(@RequestBody VehicleDispatchDetails vehicleDispatchDetails) {
        return vehicleDispatchDetailsService.update(vehicleDispatchDetails);
    }
}
